
import {ajax} from '@/http/api'

var request = function () {
    var self = {};
    //登录
    self.login = function (data, successfn) {
        ajax('/login', data, false, 'post', successfn,false);
    };
    //获取验证码
    self.sendSms = function (data, successfn) {
        ajax('/sendSms', data, false, 'post', successfn,false);
    };
    //首页信息
    self.getHome = function (data, successfn) {
        ajax('/getHome', data, false, 'post', successfn,false);
    };
    //交易明细
    self.getRecordList = function (data, successfn) {
        ajax('/recordlist', data, false, 'post', successfn,false);
    };
    //赠送红包
    self.giveRed = function (data, successfn) {
        ajax('/giveRed', data, false, 'post', successfn,false);
    };
    
    return self;
}();

export {
    request
}